package common.common.api;

import common.common.Util.ResponseBean;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;

public interface CommonApi {

    @PostMapping(value = "/stars/regist",consumes = "application/json")
    ResponseBean register(@RequestBody String json);

    @PostMapping("/stars/phonelogin")
    ResponseBean Login(@RequestParam("phone") String phone,@RequestParam("password") String password);

    @GetMapping("/stars/getphonecode")
    void GetPhoneCode(@RequestParam("phone") String phone);

    @PostMapping("/stars/jobnumberlogin")
    ResponseBean jobNumberLogin(@RequestParam("jobnumber")String jobnumber,@RequestParam("password") String password);

    @PostMapping(value = "/personal/addsecurity",consumes = "application/json")
    ResponseBean addSecurity(@RequestBody String json);

    @PostMapping(value = "/personal/updateavatar",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    ResponseBean updateavatar(MultipartFile file);
}
